#!/usr/bin/env bash

rules_go=$(pwd)/bazel_files/rules_go/rules_go-0.18.6.tar.gz
rules_go_dir=`dirname $rules_go`

if [[ ! -d $rules_go_dir ]];then
    mkdir -p $rules_go_dir
fi

if [[ -f $rules_go  ]];then
    rm -rf $rules_go
    echo "删除 $rules_go ..."
fi

cd rules_go-0.18.6~ && tar -zcf $rules_go *
cd -
shasum -a 256 $rules_go | cut -d' ' -f1 > $rules_go_dir/sha256.txt

